package com.knife.database.backup.config;

import org.springframework.boot.context.properties.ConfigurationProperties;

import java.util.List;

/**
 * 数据库备份配置类
 *
 * @author： 76875
 * @date： 2022/3/31 星期四 17:57
 * @description：
 * @modifiedBy：
 * @version: 1.0
 */
@ConfigurationProperties(prefix = "knife.database.backup")
public class KnifeDbBackUpProperties {

    /**
     * 备份数据库的名称
     */
    private String dbName;

    private String template;

    /**
     * 表sql文件存放的临时目录
     */
    private String tempDir;

    /**
     * true 全部生成在一个文件中
     * false 按表名生成
     */
    private Boolean allIn;

    /**
     * 优先级高于ignoreTableNameList
     *
     * @author tianhao.luo@hand-china.com
     * @date 2022/4/1 12:06 上午
     */
    private List<String> onlyTableNames;
    /**
     * 优先级低于onlyTableNameList，当配置了onlyTableNameList时，本配置不生效
     *
     * @author tianhao.luo@hand-china.com
     * @date 2022/4/1 12:06 上午
     */
    private List<String> ignoreTableNames;


    public Boolean getAllIn() {
        return allIn;
    }

    public void setAllIn(Boolean allIn) {
        this.allIn = allIn;
    }

    public List<String> getOnlyTableNames() {
        return onlyTableNames;
    }

    public void setOnlyTableNames(List<String> onlyTableNames) {
        this.onlyTableNames = onlyTableNames;
    }

    public List<String> getIgnoreTableNames() {
        return ignoreTableNames;
    }

    public void setIgnoreTableNames(List<String> ignoreTableNames) {
        this.ignoreTableNames = ignoreTableNames;
    }

    public String getTempDir() {
        return tempDir;
    }

    public void setTempDir(String tempDir) {
        this.tempDir = tempDir;
    }

    public String getDbName() {
        return dbName;
    }

    public void setDbName(String dbName) {
        this.dbName = dbName;
    }

    public String getTemplate() {
        return template;
    }

    public void setTemplate(String template) {
        this.template = template;
    }
}
